package com.ruoyi.room.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.room.mapper.RoomGoodMapper;
import com.ruoyi.room.domain.RoomGood;
import com.ruoyi.room.service.IRoomGoodService;

/**
 * 奖池商品Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-14
 */
@Service
public class RoomGoodServiceImpl implements IRoomGoodService 
{
    @Autowired
    private RoomGoodMapper roomGoodMapper;

    /**
     * 查询奖池商品
     * 
     * @param id 奖池商品主键
     * @return 奖池商品
     */
    @Override
    public RoomGood selectRoomGoodById(Long id)
    {
        return roomGoodMapper.selectRoomGoodById(id);
    }

    /**
     * 查询奖池商品列表
     * 
     * @param roomGood 奖池商品
     * @return 奖池商品
     */
    @Override
    public List<RoomGood> selectRoomGoodList(RoomGood roomGood)
    {
        return roomGoodMapper.selectRoomGoodList(roomGood);
    }

    /**
     * 新增奖池商品
     * 
     * @param roomGood 奖池商品
     * @return 结果
     */
    @Override
    public int insertRoomGood(RoomGood roomGood)
    {
        roomGood.setCreateTime(DateUtils.getNowDate());
        return roomGoodMapper.insertRoomGood(roomGood);
    }

    /**
     * 修改奖池商品
     * 
     * @param roomGood 奖池商品
     * @return 结果
     */
    @Override
    public int updateRoomGood(RoomGood roomGood)
    {
        return roomGoodMapper.updateRoomGood(roomGood);
    }

    /**
     * 批量删除奖池商品
     * 
     * @param ids 需要删除的奖池商品主键
     * @return 结果
     */
    @Override
    public int deleteRoomGoodByIds(Long[] ids)
    {
        return roomGoodMapper.deleteRoomGoodByIds(ids);
    }

    /**
     * 删除奖池商品信息
     * 
     * @param id 奖池商品主键
     * @return 结果
     */
    @Override
    public int deleteRoomGoodById(Long id)
    {
        return roomGoodMapper.deleteRoomGoodById(id);
    }
}
